<% set_title "新建栏目" %>
<% content_for :head do -%>
<script type="text/javascript">
jQuery(function($){
  $("#section_name").keyup(function(){
    var section = { name: null, path: "<%= @parent.path %>".replace(/\/$/, '') }
    section.name = $.trim($(this).val()).toLowerCase().replace(/-|_/g, '').replace(/ /g, '_').replace(/\W/g, '')
    $("#section_path").val(section.path + "/" + section.name)
  })
})
</script>                       
<% end -%>
<%= render :partial => 'form' %>
